function calculate() {
  let g = 9.8

  let input1 = parseFloat(document.getElementById("input1").value);   //m1
  let input2 = parseFloat(document.getElementById("input2").value);   //m2
  let input3 = parseFloat(document.getElementById("input3").value);  //mp
  let input4 = parseFloat(document.getElementById("input4").value);  //k  
  let input5 = parseFloat(document.getElementById("input5").value);  //s1
  let input6 = parseFloat(document.getElementById("input6").value);  //φ

// v1结果
let result = (input2+input1+input3)/input1 * Math.sqrt(2*g*input6*input4*input5) * 3.6


  //console.log("input1", input1);

  if (!input1 ) input1  = 0;
  if (!input2 ) input2  = 0;
  if (!input3 ) input3  = 0;  
  if (!input4 ) input1  = 0;
  if (!input5 ) input2  = 0;
  if (!input6 ) input3  = 0;



  if (result == 'NaN') {
    result = 0
    alert('请按要求输入数据！')
    location.reload()
  }

  document.getElementById("result").textContent = result;
}